package com.bsoft.config;

import com.bsoft.message.ClusteringMessage;
import org.springframework.amqp.core.TopicExchange;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;

@Configuration
public class RabbitConfig {

    /**
     * 集群消费的实例的配置
     */

    public  static class ClusteringConfiguration{
          //创建toplic exchange
         @Bean
        public TopicExchange clusteringExchange(){
            return  new TopicExchange(ClusteringMessage.EXCHANGE,
                    true,
                    false);
        }
    }
}
